package com.snowwolf.user.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author: snowwolf
 * @description: ribbon 实现客户端负载均衡（轮询获取）
 * @date: Create in 2019/2/25 15:40
 * @modified by:
 * @versions：0.1.0
 */
@Configuration
public class RibbonConfig {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
